<template>
  <div class="father">
    <h3>父组件</h3>
    <div class="content">
      <Category title="热门游戏列表">
        <template v-slot:s1>
          <ul style="text-align: left">
            <li v-for="g in games" :key="g.id">{{ g.name }}</li>
          </ul>
        </template>
      </Category>
      <Category title="今日美食城市">
        <template #s2><img :src="imgUrl" alt="" /></template>
      </Category>
      <Category title="今日影视推荐">
        <template v-slot:s3><video :src="videoUrl" controls></video></template>
      </Category>
    </div>
  </div>
</template>

<script setup lang="ts" name="Father">
import Category from "./Category.vue";
import { games,imgUrl,videoUrl } from "../data";

</script>

<style scoped>
.father {
  background-color: rgb(165, 164, 164);
  padding: 20px;
  border-radius: 10px;
}
.content {
  display: flex;
  justify-content: space-evenly;
}
img,
video {
  width: 100%;
}
</style>
